-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
contrib/gofiber/fiber.v2: add reference to initial middleware span/context #992
contrib/gofiber/fiber.v2: add reference to initial middleware span/context #992
Conversation
…text StartSpanFromContext in the middleware was throwing away the returning context which prevents subsequent spans from referencing the original request span. Instead we set fiber's user context as the inital middleware context and reference that in subsequent spans via c.UserContext() Fixes #990
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just published a release, so you'll need to upmerge to get the tests to pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last gripe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'll leave this open for anyone else to have an opportunity to review and then merge tomorrow if nobody has any further comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
StartSpanFromContext in the middleware was throwing away the returning context
which prevents subsequent spans from referencing the original request span.
Instead we set fiber's user context as the initial middleware context which allows
users to reference that in subsequent spans via UserContext()
Fixes: #990